#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int climbStairs(int n) {
    int q = 0, p = 0, r = 1;
    for (int i = 1; i <= n; i++)
    {
        q = p;
        p = r;
        r = p + q;
    }
    return r;
}

int main()
{
    int n = 0;
    scanf("%d", &n);
    int ret = climbStairs(n);
    printf("%d", ret);
	return 0;
}